import { Children } from 'react'
import { Link, BrowserRouter, Routes, Route ,useRoutes} from 'react-router-dom'
import LongList from '../pages/LongList/LongList'
import List from '../pages/List/List'

const NotFound = () => <div>n111ot found</div>
import Clock from '../pages/Clock/index'

const routes=[
    {
        path:'list',
        element:<List></List>
    },
    {
        path:'longlist',
        element:<LongList></LongList>
    },
    {
        path:'*',
        element:<NotFound></NotFound>
    },{
        path:'/clock',
        element:<Clock></Clock>
    }
]
function WrapperRoutes(){
    // 识别当前的url，返回对应的组件<Layout />
    let element=useRoutes(routes)
    return element
}

export default WrapperRoutes